﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="sunsetmp.Settings"
         Height="520" MinHeight="520" WindowStyle="None" Icon="Themes\Icons\Settings.ico" DataContext="{Binding}" Title="Настройки" AllowsTransparency="True" Background="{x:Null}" Foreground="{x:Null}" Width="550" StateChanged="Window_StateChanged" ResizeMode="CanResizeWithGrip" MinWidth="550" >
    <Border Width="auto" CornerRadius="7,7,7,7" Background="{DynamicResource MyBackground}" BorderThickness="1" BorderBrush="Black" MouseLeftButtonDown="Border_MouseLeftButtonDown">
        <Grid Width="auto" Margin="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="160"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="21" />
                <RowDefinition Height="4"/>
                <RowDefinition Height="23"/>
                <RowDefinition Height="4"/>
                <RowDefinition Height="23"/>
                <RowDefinition Height="4"/>
                <RowDefinition Height="23"/>
                <RowDefinition Height="4"/>
                <RowDefinition/>
                <RowDefinition Height="4"/>
                <RowDefinition Height="23"/>
                <RowDefinition Height="4"/>
            </Grid.RowDefinitions>
            <Grid Grid.Column="2" Width="20" HorizontalAlignment="Right">
                <Button x:Name="CloseW" Click="CloseW_Click"  />
                <Path Data="{StaticResource closeStyle0}" HorizontalAlignment="Center" Fill="{DynamicResource MyItemColor}" Stretch="Fill" IsEnabled="False" AllowDrop="False" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.5"  >
                    <Path.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                        </TransformGroup>
                    </Path.RenderTransform>
                </Path>
            </Grid>
            <Label Foreground="{DynamicResource MyTextColor}" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="-3" HorizontalAlignment="Center"   FontSize="14" FontFamily="Calibri" Content="Настройки"  />
            <Button x:Name="GrandSettingsButton" Content="Основные" Grid.Row="2" Click="SettingsButtons_Click" />
            <Button x:Name="ThemeSettingsButton" Content="Оформление" Grid.Row="4" Click="SettingsButtons_Click" />
            <Button x:Name="HotKeySettingsButton" Content="Горячие клавиши" Grid.Row="6" Click="SettingsButtons_Click" />
            <Grid Grid.Column="2" Grid.Row="2" Margin="2,2,2,0" Grid.RowSpan="{DynamicResource ResourceKey=SettingsSpan}" Width="auto" Height="auto" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto">
                <Grid x:Name="GrandSettingsGrid" Margin="2" Visibility="Visible" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="6"/>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="6"/>
                        <ColumnDefinition Width="24"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="4"/>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="4"/>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="4"/>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="4"/>
                    </Grid.RowDefinitions>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="1" Height="1.45"/>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="7" Height="1.45"/>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="5" Height="1.45"/>
                    <Label Foreground="{DynamicResource MyTextColor}" Content="Загружать музыку в"/>
                    <TextBox Grid.Column="2" x:Name="DownloadPathBox" Height="auto" Width="auto"/>
                    <Button x:Name="FolderDialogButton" Grid.Column="5" Content="..." ToolTip="Выбрать папку" Click="FolderDialogButton_Click" Background="{DynamicResource ResourceKey=ControlLightBackground}" />
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="3" Height="1.45"/>
                    <Label Foreground="{DynamicResource MyTextColor}" Grid.ColumnSpan="3" Grid.Row="2" Content="Открывать выезжающее меню при запуске"/>
                    <CheckBox x:Name="OpenSliderAtStart" IsChecked="True" Grid.Column="4" Grid.Row="2" VerticalAlignment="Center"/>
                    <Label Foreground="{DynamicResource MyTextColor}" Grid.ColumnSpan="3" Grid.Row="4" Content="Отображать название трека при свернутом плейлисте"/>
                    <CheckBox x:Name="OpenTitleInMinimal" IsChecked="True" Grid.Column="4" Grid.Row="4" VerticalAlignment="Center"/>
                    <Label Foreground="{DynamicResource MyTextColor}" Grid.ColumnSpan="3" Grid.Row="6" Content="Проверять обновления"/>
                    <CheckBox x:Name="CheckUpdateFlag" IsChecked="True" Grid.Column="4" Grid.Row="6" VerticalAlignment="Center"/>
                </Grid>
                <Grid x:Name="ThemeSettingsGrid" Margin="2" Visibility="Hidden" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="6"/>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="6"/>
                        <ColumnDefinition Width="20"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="4"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="4"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="4"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="4"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="4"/>
                    </Grid.RowDefinitions>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="1" Height="1.45"/>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="3" Height="1.45"/>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="5" Height="1.45"/>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="7" Height="1.45"/>
                    <Grid Background="Black" Grid.ColumnSpan="5" Grid.Row="9" Height="1.45"/>
                    <Label Content="Тема" Foreground="{DynamicResource MyTextColor}" />
                    <ComboBox x:Name="ThemeComboBox" Grid.Column="2" Height="auto" SelectionChanged="ThemeComboBox_SelectionChanged" Grid.ColumnSpan="3" />
                    <Label Content="Цвет фона" Grid.Row="2" Foreground="{DynamicResource MyTextColor}" />
                    <TextBox x:Name="BackgroundColorBox" Grid.Column="2" Grid.Row="2" Height="auto" />
                    <Button x:Name="BackgroundColorButton" Content="..." Grid.Column="4" Grid.Row="2" Click="ColorButton_Click"/>
                    <Label Content="Цвет текста" Grid.Row="4" Foreground="{DynamicResource MyTextColor}" />
                    <TextBox x:Name="TextColorBox" Grid.Column="2" Grid.Row="4" Height="auto"/>
                    <Button x:Name="TextColorButton" Content="..." Grid.Column="4" Grid.Row="4" Click="ColorButton_Click"/>
                    <Label Content="Цвет иконок" Grid.Row="6" Foreground="{DynamicResource MyTextColor}" />
                    <TextBox x:Name="IconColorBox" Grid.Column="2" Grid.Row="6" Height="auto" />
                    <Button x:Name="IconColorButton" Content="..." Grid.Column="4" Grid.Row="6" Click="ColorButton_Click"/>
                    <Label Content="Цвет иконок vk менеджера" Grid.Row="8" Foreground="{DynamicResource MyTextColor}" />
                    <TextBox x:Name="VkIconColorBox" Grid.Column="2" Grid.Row="8" Height="auto"/>
                    <Button x:Name="VkIconColorButton" Content="..." Grid.Column="4" Grid.Row="8" Click="ColorButton_Click"/>
                </Grid>
                <Grid x:Name="HotKeySettingsGrid" Visibility="Hidden" VerticalAlignment="Top" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="6"/>
                        <ColumnDefinition MaxWidth="200"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions/>
                </Grid>
            </Grid>
            <Grid Grid.Row="{DynamicResource ResourceKey=LastRow}" Grid.Column="2" Grid.ColumnSpan="3" MaxWidth="550" Margin="0,0,15,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="4"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="4"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="4"/>
                </Grid.ColumnDefinitions>
                <Button x:Name="OkButton" Click="OkButton_Click" Content="OK" />
                <Button x:Name="CancelButton" Grid.Column="2" Content="Отмена" Click="CloseW_Click"/>
                <Button x:Name="ApplyButton" Grid.Column="4" Content="Применить" Click="ApplyButton_Click"/>
            </Grid>
        </Grid>
    </Border>
</Window>